﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 消息通知表基础输入参数
/// </summary>
public class AppNotificationBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 接收用户ID
    /// </summary>
    [Required(ErrorMessage = "接收用户ID不能为空")]
    public virtual long? ReceiverId { get; set; }
    
    /// <summary>
    /// 发送用户ID
    /// </summary>
    public virtual long? SenderId { get; set; }
    
    /// <summary>
    /// 关联的求购ID
    /// </summary>
    public virtual long? PurchaseId { get; set; }
    
    /// <summary>
    /// 关联的竞拍ID
    /// </summary>
    public virtual long? BidId { get; set; }
    
    /// <summary>
    /// 消息类型
    /// </summary>
    [Dict(nameof(NotificationTypeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "消息类型不能为空")]
    public virtual NotificationTypeEnum? Type { get; set; }
    
    /// <summary>
    /// 消息标题
    /// </summary>
    [Required(ErrorMessage = "消息标题不能为空")]
    public virtual string Title { get; set; }
    
    /// <summary>
    /// 消息内容
    /// </summary>
    public virtual string Content { get; set; }
    
    /// <summary>
    /// 是否已读
    /// </summary>
    public virtual bool? IsRead { get; set; }
    
    /// <summary>
    /// 阅读时间
    /// </summary>
    public virtual DateTime? ReadTime { get; set; }
    
}

/// <summary>
/// 消息通知表分页查询输入参数
/// </summary>
public class PageAppNotificationInput : BasePageInput
{
    /// <summary>
    /// 接收用户ID
    /// </summary>
    public long? ReceiverId { get; set; }
    
    /// <summary>
    /// 发送用户ID
    /// </summary>
    public long? SenderId { get; set; }
    
    /// <summary>
    /// 消息类型
    /// </summary>
    [Dict(nameof(NotificationTypeEnum), AllowNullValue=true)]
    public NotificationTypeEnum? Type { get; set; }
    
    /// <summary>
    /// 是否已读
    /// </summary>
    public bool? IsRead { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 消息通知表增加输入参数
/// </summary>
public class AddAppNotificationInput
{
    /// <summary>
    /// 接收用户ID
    /// </summary>
    [Required(ErrorMessage = "接收用户ID不能为空")]
    public long? ReceiverId { get; set; }
    
    /// <summary>
    /// 发送用户ID
    /// </summary>
    public long? SenderId { get; set; }
    
    /// <summary>
    /// 关联的求购ID
    /// </summary>
    public long? PurchaseId { get; set; }
    
    /// <summary>
    /// 关联的竞拍ID
    /// </summary>
    public long? BidId { get; set; }
    
    /// <summary>
    /// 消息类型
    /// </summary>
    [Dict(nameof(NotificationTypeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "消息类型不能为空")]
    public NotificationTypeEnum? Type { get; set; }
    
    /// <summary>
    /// 消息标题
    /// </summary>
    [Required(ErrorMessage = "消息标题不能为空")]
    [MaxLength(100, ErrorMessage = "消息标题字符长度不能超过100")]
    public string Title { get; set; }
    
    /// <summary>
    /// 消息内容
    /// </summary>
    [MaxLength(500, ErrorMessage = "消息内容字符长度不能超过500")]
    public string Content { get; set; }
    
    /// <summary>
    /// 是否已读
    /// </summary>
    public bool? IsRead { get; set; }
    
    /// <summary>
    /// 阅读时间
    /// </summary>
    public DateTime? ReadTime { get; set; }
    
}

/// <summary>
/// 消息通知表删除输入参数
/// </summary>
public class DeleteAppNotificationInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 消息通知表更新输入参数
/// </summary>
public class UpdateAppNotificationInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 接收用户ID
    /// </summary>    
    [Required(ErrorMessage = "接收用户ID不能为空")]
    public long? ReceiverId { get; set; }
    
    /// <summary>
    /// 发送用户ID
    /// </summary>    
    public long? SenderId { get; set; }
    
    /// <summary>
    /// 关联的求购ID
    /// </summary>    
    public long? PurchaseId { get; set; }
    
    /// <summary>
    /// 关联的竞拍ID
    /// </summary>    
    public long? BidId { get; set; }
    
    /// <summary>
    /// 消息类型
    /// </summary>    
    [Dict(nameof(NotificationTypeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "消息类型不能为空")]
    public NotificationTypeEnum? Type { get; set; }
    
    /// <summary>
    /// 消息标题
    /// </summary>    
    [Required(ErrorMessage = "消息标题不能为空")]
    [MaxLength(100, ErrorMessage = "消息标题字符长度不能超过100")]
    public string Title { get; set; }
    
    /// <summary>
    /// 消息内容
    /// </summary>    
    [MaxLength(500, ErrorMessage = "消息内容字符长度不能超过500")]
    public string Content { get; set; }
    
    /// <summary>
    /// 是否已读
    /// </summary>    
    public bool? IsRead { get; set; }
    
    /// <summary>
    /// 阅读时间
    /// </summary>    
    public DateTime? ReadTime { get; set; }
    
}

/// <summary>
/// 消息通知表主键查询输入参数
/// </summary>
public class QueryByIdAppNotificationInput : DeleteAppNotificationInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataAppNotificationInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 消息通知表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportAppNotificationInput : BaseImportInput
{
    /// <summary>
    /// 接收用户ID 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? ReceiverId { get; set; }
    
    /// <summary>
    /// 接收用户ID 文本
    /// </summary>
    [ImporterHeader(Name = "*接收用户ID")]
    [ExporterHeader("*接收用户ID", Format = "", Width = 25, IsBold = true)]
    public string ReceiverFkDisplayName { get; set; }
    
    /// <summary>
    /// 发送用户ID 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? SenderId { get; set; }
    
    /// <summary>
    /// 发送用户ID 文本
    /// </summary>
    [ImporterHeader(Name = "发送用户ID")]
    [ExporterHeader("发送用户ID", Format = "", Width = 25, IsBold = true)]
    public string SenderFkDisplayName { get; set; }
    
    /// <summary>
    /// 关联的求购ID 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? PurchaseId { get; set; }
    
    /// <summary>
    /// 关联的求购ID 文本
    /// </summary>
    [ImporterHeader(Name = "关联的求购ID")]
    [ExporterHeader("关联的求购ID", Format = "", Width = 25, IsBold = true)]
    public string PurchaseFkDisplayName { get; set; }
    
    /// <summary>
    /// 关联的竞拍ID 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? BidId { get; set; }
    
    /// <summary>
    /// 关联的竞拍ID 文本
    /// </summary>
    [ImporterHeader(Name = "关联的竞拍ID")]
    [ExporterHeader("关联的竞拍ID", Format = "", Width = 25, IsBold = true)]
    public string BFkDisplayName { get; set; }
    
    /// <summary>
    /// 消息类型
    /// </summary>
    [ImporterHeader(Name = "*消息类型")]
    [ExporterHeader("*消息类型", Format = "", Width = 25, IsBold = true)]
    public NotificationTypeEnum? Type { get; set; }
    
    /// <summary>
    /// 消息标题
    /// </summary>
    [ImporterHeader(Name = "*消息标题")]
    [ExporterHeader("*消息标题", Format = "", Width = 25, IsBold = true)]
    public string Title { get; set; }
    
    /// <summary>
    /// 消息内容
    /// </summary>
    [ImporterHeader(Name = "消息内容")]
    [ExporterHeader("消息内容", Format = "", Width = 25, IsBold = true)]
    public string Content { get; set; }
    
    /// <summary>
    /// 是否已读
    /// </summary>
    [ImporterHeader(Name = "是否已读")]
    [ExporterHeader("是否已读", Format = "", Width = 25, IsBold = true)]
    public bool? IsRead { get; set; }
    
    /// <summary>
    /// 阅读时间
    /// </summary>
    [ImporterHeader(Name = "阅读时间")]
    [ExporterHeader("阅读时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? ReadTime { get; set; }
    
}
